﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace RevisionTool
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                var data = Convert.ToDouble(raw.Text.Trim());
                var interval = Convert.ToDouble(interv.Text.Trim());
                var re =DataRevision.Revision(data, interval);
                result.Text = re.ToString();
            }
            catch (Exception)
            {
                MessageBox.Show("原始数据或者修约间隔格式有误，请填写数值类型");
                return;
            }
        }
    }
}
